package com.kkyy.msystem.feign;

import com.kkyy.msystem.entity.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.math.BigInteger;
import java.util.List;

@FeignClient("kkyy-findmusic")
public interface FeignService {
    @RequestMapping("/findmusic/banners2")
    public List<BannersEntity> getBanners2();

    @RequestMapping("/findmusic/mvs2")
    public List<MvsEntity> getMvs2();

    @RequestMapping("/findmusic/playlists2")
    public List<PlayListsEntity> getPlayLists2();

    @RequestMapping("/findmusic/songs2")
    public List<SongsEntity> getSongs2();

    // 远程调用传参带@RequestParam注解
    @RequestMapping("/findmusic/delbanner")
    public void delBannerById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/playlistdel")
    public void delPlayListById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/songdel")
    public void delSongById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/mvdel")
    public void delMvById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/upMv")
    public void upMvById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/downMv")
    public void downMvById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/upPlaylists")
    void upPlaylistsById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/downPlaylists")
    void downPlaylistsById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/downSong")
    void downSongById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/upSong")
    void upSongById(@RequestParam("id") Integer id);

    @RequestMapping("/findmusic/addBannerUrl")
    void addBannerUrl(@RequestParam("url") String url);

    @RequestMapping(value = "/findmusic/addMvInfo", method = RequestMethod.GET)
    void addMvInfo(
            @RequestParam("picurl") String picurl,
            @RequestParam("count") Integer count,
            @RequestParam("mvreco") String mvreco,
            @RequestParam("mvart") String mvart,
            @RequestParam("mvname") String mvname,
            @RequestParam("location") Integer location);

    @RequestMapping(value = "/findmusic/addSongInfo", method = RequestMethod.GET)
    void addSongInfo(
            @RequestParam("songname") String songname,
            @RequestParam("songart") String songart,
            @RequestParam("picurl") String picurl,
            @RequestParam("location") Integer location);

    @RequestMapping(value = "/findmusic/addPlaylist", method = RequestMethod.GET)
    void addPlaylist(
            @RequestParam("copywriter") String copywriter,
            @RequestParam("picurl") String picurl,
            @RequestParam("playlistname") String playlistname,
            @RequestParam("location") BigInteger location);
}